-instance = @program
-@title = "GRC Program: #{instance.title}"

-content_for :header do

  .breadcrumbs-holder
    %ul.breadcrumbs
      %li=link_to 'dashboard', programs_dash_path
      %li
        %span
          =instance.title

  %h1.programs
    -if instance.company_controls?
      .grcobject.governance{:rel => "tooltip", :'data-placement'=>"bottom", :title => "Program"}    
        %i.grcicon-control
    -else
      .grcobject.programs{:rel => "tooltip", :'data-placement'=>"bottom", :title => "Program"}    
        %i.grcicon-program
    %span
      %strong Program:
    =instance.title

-content_for :page_help, 'program'

-content_for :subheader_extras do
  %ul.actions.pull-right
    -if instance.company_controls?
      %li
        %a{:href => "#", :class => "disabled"}
          %i.grcicon-reg-map
          %span Consolidate Controls
    -else
      %li
        %a{:href => new_flow_cycle_path(:'program_id' => instance.id), :'data-toggle' => 'modal-ajax-form', :'data-modal-reset' => 'reset', :'data-form-target' => 'redirect'}
          %i.grcicon-audit
          %span Start Audit
    %li
      %a{:href => edit_flow_program_path(instance), :'data-toggle' => 'modal-ajax-form', :'data-modal-reset' => 'reset', :'data-form-target' => 'refresh', :'data-modal-class' => 'modal-wide',:title => 'Edit Program'}
        %i.grcicon-edit
        %span Edit Program



-content_for :subheader_plus do
  %a.navbarplus.fltrt{ :href => new_flow_program_path, :'data-toggle' => 'modal-ajax-form', :'data-form-target' => 'redirect', :'data-modal-reset' => 'reset', :'data-modal-class' => 'modal-wide' }

.container-fluid
  #columns.row-fluid{ :'data-resize' => "true" }
    #middle-column.span8.widget-area
      =render :partial => 'main',
              :layout => 'layouts/widget_box',
              :locals => { :program => instance, :widget_class => 'widget-tabs widget-tabs-horizontal programs' }
      -unless instance.company_controls?
        =render :partial => 'shared/related',
                :layout => 'layouts/widget_box',
                :locals => { :instance => instance, :widget_title => "Impact/Scope", :widget_class => 'widget-tabs widget-tabs-horizontal related business' }
      -if instance.company_controls?
        =render :partial => 'linked_programs',
                :layout => 'layouts/widget_box',
                :locals => { :instance => instance, :widget_class => 'widget-tabs widget-tabs-horizontal programs' }
      -else
        =render :partial => 'shared/add_widget_section'

    #right-column.span4.widget-area
      =render :partial => 'info',
              :layout => 'layouts/widget_box',
              :locals => { :program => instance, :widget_class => 'programs'}
      -unless instance.company_controls?
        =render :partial => 'audit_cycles',
                :layout => 'layouts/widget_box',
                :locals => { :program => instance, :widget_class => 'programs' }
      =render :partial => 'more_info',
              :layout => 'layouts/widget_box',
              :locals => { :program => instance, :widget_class => 'related business'}
      -unless instance.company_controls?
        =render :partial => 'shared/add_widget_section'
